home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / mui_toolbar / modules / mui / toolbar_mcc.m < prev   
Encoding:
Text File  |  2002-10-28  |  5.1 KB  |  175 lines

  1. /*
  2. **
  3. ** $VER: Toolbar_mcc.h V15.6
  4. ** Copyright © 1997-00 Benny Kjær Nielsen. All rights reserved.
  5. **
  6. ** Translated into D by Miklós Németh
  7. **
  8. */
  9.  
  10. /*** Include stuff ***/
  11.  
  12. MODULE 'libraries/mui'
  13. MODULE 'utility/tagitem'
  14.  
  15. CONST BKN_SERIAL =$fcf70000
  16.  
  17.  
  18. /*** MUI Defines ***/
  19.  
  20. #define MUIC_Toolbar 'Toolbar.mcc'
  21. #define ToolbarObject MUI_NewObjectA(MUIC_Toolbar,[TAG_IGNORE, 0
  22.  
  23. /*** Methods ***/
  24.  
  25. #define MUIM_Toolbar_BottomEdge      (BKN_SERIAL | $07)
  26. #define MUIM_Toolbar_CheckNotify     (BKN_SERIAL | $0d)
  27. #define MUIM_Toolbar_DrawButton      (BKN_SERIAL | $0c)
  28. #define MUIM_Toolbar_KillNotify      (BKN_SERIAL | $02)
  29. #define MUIM_Toolbar_KillNotifyObj   (BKN_SERIAL | $03)
  30. #define MUIM_Toolbar_LeftEdge        (BKN_SERIAL | $08)
  31. #define MUIM_Toolbar_MultiSet        (BKN_SERIAL | $04)
  32. #define MUIM_Toolbar_Notify          (BKN_SERIAL | $01)
  33. #define MUIM_Toolbar_Redraw          (BKN_SERIAL | $05)
  34. #define MUIM_Toolbar_ReloadImages    (BKN_SERIAL | $0b)
  35. #define MUIM_Toolbar_RightEdge       (BKN_SERIAL | $09)
  36. #define MUIM_Toolbar_Set             (BKN_SERIAL | $06)
  37. #define MUIM_Toolbar_TopEdge         (BKN_SERIAL | $0a)
  38.  
  39. /*** Method OBJECTs ***/
  40.  
  41. OBJECT MUIP_Toolbar_CheckNotify
  42.     MethodID:ULONG,
  43.     TrigButton:ULONG,
  44.     TrigAttr:ULONG,
  45.     TrigValue:ULONG
  46.  
  47. OBJECT MUIP_Toolbar_Edge
  48.     MethodID:ULONG,
  49.     Button:ULONG
  50.  
  51. OBJECT MUIP_Toolbar_KillNotify
  52.     MethodID:ULONG,
  53.     TrigButton:ULONG,
  54.     TrigAttr:ULONG
  55.  
  56. OBJECT MUIP_Toolbar_KillNotifyObj
  57.     MethodID:ULONG
  58.  
  59. OBJECT MUIP_Toolbar_MultiSet
  60.     MethodID:ULONG,
  61.     Flag:ULONG,
  62.     Value:ULONG,
  63.     Button:LONG
  64.  
  65. OBJECT MUIP_Toolbar_Notify
  66.     MethodID:ULONG,
  67.     TrigButton:ULONG,
  68.     TrigAttr:ULONG,
  69.     TrigValue:ULONG,
  70.     DestObj:PTR TO _Object,
  71.     FollowParams:ULONG
  72.  
  73. OBJECT MUIP_Toolbar_Redraw
  74.     MethodID:ULONG,
  75.     Changes:ULONG
  76.  
  77. OBJECT MUIP_Toolbar_ReloadImages
  78.     MethodID:ULONG,
  79.     Normal:PTR TO UBYTE,
  80.     Select:PTR TO UBYTE,
  81.     Ghost:PTR TO UBYTE
  82.  
  83. OBJECT MUIP_Toolbar_Set
  84.     MethodID:ULONG,
  85.     Button:ULONG,
  86.     Flag:ULONG,
  87.     Value:ULONG
  88.  
  89. /*** Special method values ***/
  90.  
  91. CONST MUIV_Toolbar_Set_Ghosted     =$04
  92. CONST MUIV_Toolbar_Set_Gone        =$08
  93. CONST MUIV_Toolbar_Set_Selected    =$10
  94.  
  95. CONST MUIV_Toolbar_Notify_Pressed    =0
  96. CONST MUIV_Toolbar_Notify_Active     =1
  97. CONST MUIV_Toolbar_Notify_Ghosted    =2
  98. CONST MUIV_Toolbar_Notify_Gone       =3
  99. CONST MUIV_Toolbar_Notify_LeftEdge   =4
  100. CONST MUIV_Toolbar_Notify_RightEdge  =5
  101. CONST MUIV_Toolbar_Notify_TopEdge    =6
  102. CONST MUIV_Toolbar_Notify_BottomEdge =7
  103.  
  104. /*** Special value for MUIM_Toolbar_Notify ***/
  105.  
  106. CONST MUIV_Toolbar_Qualifier =$49893135
  107.  
  108. /*** Special method flags ***/
  109.  
  110. /*** Attributes ***/
  111.  
  112. #define MUIA_Toolbar_Description     (BKN_SERIAL | $16 )
  113. #define MUIA_Toolbar_HelpString      (BKN_SERIAL | $17 )
  114. #define MUIA_Toolbar_Horizontal      (BKN_SERIAL | $15 )
  115. #define MUIA_Toolbar_ImageGhost      (BKN_SERIAL | $13 )
  116. #define MUIA_Toolbar_ImageNormal     (BKN_SERIAL | $11 )
  117. #define MUIA_Toolbar_ImageSelect     (BKN_SERIAL | $12 )
  118. #define MUIA_Toolbar_ImageType       (BKN_SERIAL | $10 )
  119. #define MUIA_Toolbar_ParseUnderscore (BKN_SERIAL | $18 )
  120. #define MUIA_Toolbar_Path            (BKN_SERIAL | $1b )
  121. #define MUIA_Toolbar_Permutation     (BKN_SERIAL | $1a )
  122. #define MUIA_Toolbar_Qualifier       (BKN_SERIAL | $1c )
  123. #define MUIA_Toolbar_Reusable        (BKN_SERIAL | $19 )
  124.  
  125. /*** Special attribute values ***/
  126.  
  127. CONST MUIV_Toolbar_ImageType_File     =0
  128. CONST MUIV_Toolbar_ImageType_Memory   =1
  129. CONST MUIV_Toolbar_ImageType_Object   =2
  130.  
  131. /*** OBJECTures, Flags & Values ***/
  132.  
  133. CONST TP_SPACE =-2
  134. CONST TP_END   =-1
  135.  
  136. OBJECT MUIP_Toolbar_Description
  137.   Type:UBYTE,               /* Type of button - see possible values below (TDT_). */
  138.   Key:UBYTE,                /* Hotkey */
  139.   Flags:UWORD,              /* The buttons current setting - see the TDF_ flags */
  140.   ToolText:PTR TO UBYTE,    /* The text beneath the icons. */
  141.   HelpString:PTR TO UBYTE,  /* The string used for help-bubbles or MUIA_Toolbar_HelpString */
  142.   MutualExclude:ULONG       /* Buttons to be released when this button is pressed down */
  143.  
  144.  
  145. /*** Toolbar Description Types ***/
  146.  
  147. CONST TDT_BUTTON  =0
  148. CONST TDT_SPACE   =1
  149. CONST TDT_IGNORE  =2 // Obsolete
  150. CONST TDT_END     =3
  151.  
  152. CONST TDT_IGNORE_FLAG =128
  153.  
  154. /*** Toolbar Description Flags ***/
  155.  
  156. CONST TDF_TOGGLE      =$01 /* Set this if it's a toggle-button */
  157. CONST TDF_RADIO       =$02 /* AND this if it's also a radio-button */
  158. CONST TDF_GHOSTED     =$04
  159. CONST TDF_GONE        =$08 /* Make the button temporarily go away */
  160. CONST TDF_SELECTED    =$10 /* State of a toggle-button */
  161.  
  162. #define TDF_RADIOTOGGLE (TDF_TOGGLE|TDF_RADIO) /* A practical definition */
  163.  
  164. /* TDF_RADIO and TDF_SELECTED only makes sense
  165.    if you have set the TDF_TOGGLE flag.          */
  166.  
  167. /*** Toolbar Macros ***/
  168.  
  169. #define Toolbar_Button(flags, text)          [ TDT_BUTTON, NIL, flags, text, NIL, NIL]:MUIP_Toolbar_Description
  170. #define Toolbar_KeyButton(flags, text, key)  [ TDT_BUTTON, key,  flags, text, NIL, NIL]:MUIP_Toolbar_Description
  171. #define Toolbar_Space                        [ TDT_SPACE,  NIL, NIL,  NIL, NIL, NIL]:MUIP_Toolbar_Description
  172. #define Toolbar_End                          [ TDT_END,    NIL, NIL,  NIL, NIL, NIL]:MUIP_Toolbar_Description
  173.  
  174.  
  175.